package es.cea.util;

import org.hibernate.*;
import org.hibernate.cfg.*;

public class UtilHibernate {
	public static SessionFactory getSessionFactory() {
		try {
			return new Configuration().configure("hibernate.cfg.xml")
					.buildSessionFactory();
		} catch (Exception e) {

			throw new IllegalStateException(
					"Could not locate SessionFactory in JNDI");
		}
	}
}
